package com.starlink.client.jd.request.base;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
public class CommonProductInfo implements Serializable {
    /**
     * 主产品编码；只能填一种，枚举值参照「主产品信息」
     * <a href="https://cloud.jdl.com/#/open-business-document/access-guide/267/54153"/>
     * 仅可使用与京东快递销售约定的快递产品
     */
    private String productCode;

    /**
     * 下单前校验
     * @return
     */
    public com.lop.open.api.sdk.domain.ECAP.CommonCreateOrderApi.commonCheckPreCreateOrderV1.CommonProductInfo toJd4PreCreate() {
        com.lop.open.api.sdk.domain.ECAP.CommonCreateOrderApi.commonCheckPreCreateOrderV1.CommonProductInfo productInfo =
                new com.lop.open.api.sdk.domain.ECAP.CommonCreateOrderApi.commonCheckPreCreateOrderV1.CommonProductInfo();
        productInfo.setProductCode(this.productCode);
        return productInfo;
    }

    /**
     * 下单
     * @return
     */
    public com.lop.open.api.sdk.domain.ECAP.CommonCreateOrderApi.commonCreateOrderV1.CommonProductInfo toJd4Create() {
        com.lop.open.api.sdk.domain.ECAP.CommonCreateOrderApi.commonCreateOrderV1.CommonProductInfo productInfo =
                new com.lop.open.api.sdk.domain.ECAP.CommonCreateOrderApi.commonCreateOrderV1.CommonProductInfo();
        productInfo.setProductCode(this.productCode);
        return productInfo;
    }
}
